
/**
 * 聊天列表模型
 * @param {未读消息数} count 
 * @param {最新消息} lastMsg 
 * @param {最新消息时间} lastMsgTime 
 * @param {好友id} friendId 
 * @param {消息列表} msgList 
 */
const chatData = (count, lastMsg, lastMsgTime, friendId, friendUserName, friendUserImg, msgList) => {
    this.count = count;
    this.lastMsg = lastMsg;
    this.lastMsgTime = lastMsgTime;
    this.friendId = friendId;
    this.friendUserName = friendUserName;
    this.friendUserImg = friendUserImg;
    this.msgList = msgList
}

/**
 * 用户消息模型
 * @param {发送消息用户id} fromUserId 
 * @param {发送消息用户名称} fromUserName 
 * @param {发送消息用户头像} fromUseImg 
 * @param {接收消息用户id} toUserId 
 * @param {接收消息用户名称} toUserName 
 * @param {接收消息用户头像} toUserImg 
 * @param {接收的消息内容} msg 
 * @param {发送消息的时间} time 
 * @param {发送的消息是否已读} read 
 */
const msgData = (fromUserId, fromUserName, fromUseImg, toUserId, toUserName, toUserImg, msg, time, read) => {
    this.fromUserId = fromUserId;
    this.fromUserName = fromUserName;
    this.fromUseImg = fromUseImg;
    this.toUserId = toUserId;
    this.toUserName = toUserName;
    this.toUserImg = toUserImg;
    this.msg = msg;
    this.time = time;
    this.read = read;
}

export default {
    chatData,
    msgData
}